function setCookie(key,value,time=3600){
    document.cookie=`${key}=${value};Max-age=${time}`;
}
function getCookie(key){
    let str = document.cookie ; 
    let arr = str.split("; ");
    for( let i = 0 ; i < arr.length ; i ++ ){
        let newArr = arr[i].split("=");
        if( newArr[0] == key ){
            return newArr[1] ;
            break;
        }
    }
}
function delCookie(key){
    document.cookie = `${key}='';Max-age=-1`;
}